----------------------------------------------------------------------------------------------------------------
       log:  C:\Users\Public\Documents\Old\Lavoro Gregory\intra_firm_extensive_Table_6.log
  log type:  text
 opened on:   4 Sep 2013, 13:30:40

. 
. clear

. set more off

. set mem 3000m

Current memory allocation

                    current                                 memory usage
    settable          value     description                 (1M = 1024k)
    --------------------------------------------------------------------
    set maxvar         5000     max. variables allowed           1.947M
    set memory         3000M    max. data space              3,000.000M
    set matsize        1000     max. RHS vars in models          7.713M
                                                            -----------
                                                             3,009.660M

. 
. use "Calcoli\Final_database_extensive_JIE.dta", clear

. 
. sort siren

. 
. merge siren using Calcoli\Selection_firm_JIE.dta
variable siren does not uniquely identify observations in the master data

. drop _merge

. rename IM_firm IM

. replace  IM=0 if  IM==.
(962463 real changes made)

. keep if EIIG==1 | champ_theorique==0 
(104145 observations deleted)

. sort siren

. merge siren using "Calcoli\random_no_EIIG_champs_theorique_JIE.dta"
variable siren does not uniquely identify observations in the master data

. keep if EIIG==1 | champ_theorique==0 &  random_no_EIIG_champs_theorique==1
(755829 observations deleted)

. 
. 
. destring  siren, generate(siren_number)
siren has all characters numeric; siren_number generated as long

. gen contr_orig1=(1-frac_lib_diff_orig)
(6644 missing values generated)

. gen contr_prod1=(1-frac_lib_diff_prod_4dig)
(167802 missing values generated)

. 
. 
. *note that complex final goods are produced with compex intermediates (this is an unweigted corr). To add in T
> able 1.
. corr  contr_orig1 contr_prod1
(obs=111179)

             | contr~g1 contr~d1
-------------+------------------
 contr_orig1 |   1.0000
 contr_prod1 |   0.3104   1.0000


. 
. 
. 
. gen ln_distw=log(distw)
(2431 missing values generated)

. 
. gen ln_pop=log(pop)
(3543 missing values generated)

. gen ln_gdp=log(gdp)
(3628 missing values generated)

. 
. iis siren_number

. 
. **************Table 5**************
. 
. local instruct "tex tdec(4) rdec(4) auto(4) bdec(4) sdec(4) symbol($^a$,$^b$,$^c$)  se"

. local list0 = "ln_kl ln_hl   Qc   corp_tax_r financ_develop oecd_1999 ln_distw  French_colony French_speaking 
> legor_fr IM"

. local list1 = "ln_kl ln_hl   contr_orig1  Qc  ln_capital_intensity_cpa_4 ln_skill_intensity_cpa_4  corp_tax_r 
> financ_develop oecd_1999 ln_distw  French_colony French_speaking legor_fr IM"

. local list2 = "ln_kl ln_hl   contr_orig1  contr_prod1 Qc  ln_capital_intensity_cpa_4 ln_skill_intensity_cpa_4 
>  corp_tax_r financ_develop oecd_1999 ln_distw  French_colony French_speaking legor_fr IM"

. 
. 
. 
. 
. ******
. 
. probit  intra_firm `list0', cluster(siren_number)

Iteration 0:   log pseudolikelihood =  -76047.76
Iteration 1:   log pseudolikelihood = -61722.807
Iteration 2:   log pseudolikelihood = -61225.271
Iteration 3:   log pseudolikelihood = -61224.428
Iteration 4:   log pseudolikelihood = -61224.428

Probit regression                                 Number of obs   =     251022
                                                  Wald chi2(11)   =     890.59
                                                  Prob > chi2     =     0.0000
Log pseudolikelihood = -61224.428                 Pseudo R2       =     0.1949

                       (Std. Err. adjusted for 14576 clusters in siren_number)
------------------------------------------------------------------------------
             |               Robust
  intra_firm |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       ln_kl |  -.0366747   .0192117    -1.91   0.056    -.0743289    .0009794
       ln_hl |   .2789461   .0659929     4.23   0.000     .1496023    .4082899
          Qc |   .8150254   .1236525     6.59   0.000      .572671     1.05738
  corp_tax_r |  -.0982979   .2036004    -0.48   0.629    -.4973474    .3007516
financ_dev~p |  -.0977465   .0319638    -3.06   0.002    -.1603943   -.0350987
   oecd_1999 |    .112514   .0328479     3.43   0.001     .0481333    .1768946
    ln_distw |   .1091269   .0165212     6.61   0.000     .0767459    .1415078
French_col~y |  -.0600958   .0465747    -1.29   0.197    -.1513805    .0311889
French_spe~g |    .020478   .0317095     0.65   0.518    -.0416715    .0826275
    legor_fr |    .033535   .0194397     1.73   0.085    -.0045661     .071636
          IM |   1.593398   .0610263    26.11   0.000     1.473789    1.713007
       _cons |  -3.070746   .2497461   -12.30   0.000    -3.560239   -2.581253
------------------------------------------------------------------------------

. mfx

Marginal effects after probit
      y  = Pr(intra_firm) (predict)
         =   .0607662
------------------------------------------------------------------------------
variable |      dy/dx    Std. Err.     z    P>|z|  [    95% C.I.   ]      X
---------+--------------------------------------------------------------------
   ln_kl |  -.0044124      .00231   -1.91   0.056  -.008936  .000111   11.0013
   ln_hl |   .0335605      .00795    4.22   0.000   .017981   .04914    .90089
      Qc |   .0980572      .01592    6.16   0.000   .066853  .129261   .800506
corp_t~r |  -.0118264      .02449   -0.48   0.629  -.059816  .036164   .334865
financ~p |  -.0117601      .00396   -2.97   0.003  -.019514 -.004006   .973348
oec~1999*|   .0128558      .00358    3.59   0.000    .00583  .019882   .797591
ln_distw |   .0131292      .00213    6.16   0.000   .008949  .017309   7.16712
French~y*|  -.0069603      .00521   -1.34   0.181  -.017169  .003248   .091948
French~g*|   .0024902       .0039    0.64   0.523  -.005145  .010125   .163018
legor_fr*|   .0040451      .00236    1.72   0.086  -.000576  .008667   .451391
      IM |   .1917046      .00858   22.35   0.000   .174891  .208518   .166532
------------------------------------------------------------------------------
(*) dy/dx is for discrete change of dummy variable from 0 to 1

. outreg2 `list0' using CP_extensive.xls, mfx ctitle(pooled probit counrty) `instruct' replace
CP_extensive.tex
CP_extensive.xls
dir : seeout

. 
. ******
. 
. xtprobit  intra_firm `list0', re

Fitting comparison model:

Iteration 0:   log likelihood =  -76047.76
Iteration 1:   log likelihood = -61722.807
Iteration 2:   log likelihood = -61225.271
Iteration 3:   log likelihood = -61224.428
Iteration 4:   log likelihood = -61224.428

Fitting full model:

rho =  0.0     log likelihood = -61224.428
rho =  0.1     log likelihood = -40858.295
rho =  0.2     log likelihood = -35868.628
rho =  0.3     log likelihood = -33367.683
rho =  0.4     log likelihood = -31851.988
rho =  0.5     log likelihood = -30837.241
rho =  0.6     log likelihood =  -30234.39
rho =  0.7     log likelihood =  -30014.61
rho =  0.8     log likelihood = -30387.294

Iteration 0:   log likelihood = -29562.881  
Iteration 1:   log likelihood =  -27638.25  
Iteration 2:   log likelihood = -25589.398  
Iteration 3:   log likelihood = -25334.048  
Iteration 4:   log likelihood = -25194.326  
Iteration 5:   log likelihood =  -25105.88  
Iteration 6:   log likelihood =  -25070.19  
Iteration 7:   log likelihood = -25069.501  
Iteration 8:   log likelihood = -25065.744  
Iteration 9:   log likelihood = -25055.957  
Iteration 10:  log likelihood = -25055.922  
Iteration 11:  log likelihood = -25055.922  (backed up)
Iteration 12:  log likelihood = -25051.279  
Iteration 13:  log likelihood = -25051.227  
Iteration 14:  log likelihood = -25051.227  

Random-effects probit regression                Number of obs      =    251022
Group variable: siren_number                    Number of groups   =     14576

Random effects u_i ~ Gaussian                   Obs per group: min =         1
                                                               avg =      17.2
                                                               max =       949

                                                Wald chi2(11)      =   3956.73
Log likelihood  = -25051.227                    Prob > chi2        =    0.0000

------------------------------------------------------------------------------
  intra_firm |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       ln_kl |  -.0729096   .0251415    -2.90   0.004    -.1221861   -.0236331
       ln_hl |   .0032153   .0821876     0.04   0.969    -.1578694       .1643
          Qc |   .7250558   .1463874     4.95   0.000     .4381417     1.01197
  corp_tax_r |  -.7249511   .2813007    -2.58   0.010     -1.27629   -.1736118
financ_dev~p |  -.2012984   .0320288    -6.28   0.000    -.2640737    -.138523
   oecd_1999 |   .0969279   .0391219     2.48   0.013     .0202504    .1736054
    ln_distw |   .0088439   .0156345     0.57   0.572    -.0217992    .0394869
French_col~y |   .5547766   .0407957    13.60   0.000     .4748185    .6347346
French_spe~g |   .0444091   .0385759     1.15   0.250    -.0311982    .1200164
    legor_fr |   .0753629   .0288077     2.62   0.009     .0189009    .1318249
          IM |   4.668501   .0767004    60.87   0.000     4.518171    4.818831
       _cons |  -4.741648   .2789759   -17.00   0.000    -5.288431   -4.194866
-------------+----------------------------------------------------------------
    /lnsig2u |    2.06818   .0228114                       2.02347    2.112889
-------------+----------------------------------------------------------------
     sigma_u |   2.812545   .0320791                      2.750369    2.876127
         rho |   .8877717   .0022728                      .8832393    .8921497
------------------------------------------------------------------------------
Likelihood-ratio test of rho=0: chibar2(01) =  7.2e+04 Prob >= chibar2 = 0.000

. mfx

Marginal effects after xtprobit
      y  = Linear prediction (predict)
         = -4.3887173
------------------------------------------------------------------------------
variable |      dy/dx    Std. Err.     z    P>|z|  [    95% C.I.   ]      X
---------+--------------------------------------------------------------------
   ln_kl |  -.0729096      .02514   -2.90   0.004  -.122186 -.023633   11.0013
   ln_hl |   .0032153      .08219    0.04   0.969  -.157869    .1643    .90089
      Qc |   .7250558      .14639    4.95   0.000   .438142  1.01197   .800506
corp_t~r |  -.7249511       .2813   -2.58   0.010  -1.27629 -.173612   .334865
financ~p |  -.2012984      .03203   -6.28   0.000  -.264074 -.138523   .973348
oec~1999*|   .0969279      .03912    2.48   0.013    .02025  .173605   .797591
ln_distw |   .0088439      .01563    0.57   0.572  -.021799  .039487   7.16712
French~y*|   .5547766       .0408   13.60   0.000   .474819  .634735   .091948
French~g*|   .0444091      .03858    1.15   0.250  -.031198  .120016   .163018
legor_fr*|   .0753629      .02881    2.62   0.009   .018901  .131825   .451391
      IM |   4.668501       .0767   60.87   0.000   4.51817  4.81883   .166532
------------------------------------------------------------------------------
(*) dy/dx is for discrete change of dummy variable from 0 to 1

. outreg2 `list0' using CP_extensive.xls, mfx ctitle(RE probit country) `instruct' append
CP_extensive.tex
CP_extensive.xls
dir : seeout

. 
. 
. ******
. 
. probit  intra_firm `list1', cluster(siren_number)

Iteration 0:   log pseudolikelihood = -73107.313
Iteration 1:   log pseudolikelihood = -59003.308
Iteration 2:   log pseudolikelihood = -58472.417
Iteration 3:   log pseudolikelihood = -58470.368
Iteration 4:   log pseudolikelihood = -58470.368

Probit regression                                 Number of obs   =     234786
                                                  Wald chi2(14)   =    1082.84
                                                  Prob > chi2     =     0.0000
Log pseudolikelihood = -58470.368                 Pseudo R2       =     0.2002

                       (Std. Err. adjusted for 14211 clusters in siren_number)
------------------------------------------------------------------------------
             |               Robust
  intra_firm |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       ln_kl |  -.0686738   .0196071    -3.50   0.000    -.1071031   -.0302445
       ln_hl |   .2611259   .0662627     3.94   0.000     .1312533    .3909984
 contr_orig1 |  -.3118563   .0286013   -10.90   0.000    -.3679138   -.2557988
          Qc |   .8398335   .1260348     6.66   0.000     .5928097    1.086857
ln_capital~4 |   .0698001   .0192207     3.63   0.000     .0321283    .1074719
ln_skill_i~4 |   .6174004   .0517227    11.94   0.000     .5160257    .7187751
  corp_tax_r |  -.2628702   .2069924    -1.27   0.204    -.6685678    .1428274
financ_dev~p |  -.1266997   .0328564    -3.86   0.000    -.1910969   -.0623024
   oecd_1999 |   .1304996   .0333497     3.91   0.000     .0651354    .1958639
    ln_distw |   .1063142   .0169381     6.28   0.000     .0731161    .1395123
French_col~y |  -.0649418    .048046    -1.35   0.176    -.1591103    .0292266
French_spe~g |   .0323109   .0325228     0.99   0.320    -.0314327    .0960545
    legor_fr |   .0595015   .0197611     3.01   0.003     .0207704    .0982325
          IM |   1.564311   .0619963    25.23   0.000       1.4428    1.685821
       _cons |  -4.785677   .2968953   -16.12   0.000    -5.367581   -4.203773
------------------------------------------------------------------------------

. mfx

Marginal effects after probit
      y  = Pr(intra_firm) (predict)
         =  .06153913
------------------------------------------------------------------------------
variable |      dy/dx    Std. Err.     z    P>|z|  [    95% C.I.   ]      X
---------+--------------------------------------------------------------------
   ln_kl |  -.0083443      .00238   -3.50   0.000  -.013012 -.003677   11.0093
   ln_hl |   .0317284      .00804    3.95   0.000   .015978  .047479   .902211
contr~g1 |  -.0378924      .00396   -9.56   0.000  -.045658 -.030127   .260226
      Qc |   .1020449      .01645    6.20   0.000   .069802  .134288   .801944
ln_cap~4 |   .0084811      .00238    3.56   0.000   .003808  .013154   3.99118
ln_ski~4 |   .0750179      .00666   11.27   0.000   .061973  .088063   3.14707
corp_t~r |  -.0319403      .02515   -1.27   0.204  -.081234  .017354   .334696
financ~p |  -.0153948      .00415   -3.71   0.000  -.023531 -.007259   .978027
oec~1999*|    .014927      .00362    4.12   0.000   .007832  .022022   .801632
ln_distw |   .0129178       .0022    5.87   0.000   .008603  .017233   7.16145
French~y*|  -.0075729      .00539   -1.40   0.160  -.018142  .002996   .090295
French~g*|   .0039927      .00409    0.98   0.329  -.004016  .012002   .161815
legor_fr*|   .0072665      .00245    2.97   0.003   .002471  .012062   .447003
      IM |   .1900733      .00867   21.92   0.000   .173079  .207067   .172716
------------------------------------------------------------------------------
(*) dy/dx is for discrete change of dummy variable from 0 to 1

. outreg2 `list1' using CP_extensive.xls, mfx ctitle(pooled probit) `instruct' append
CP_extensive.tex
CP_extensive.xls
dir : seeout

. 
. ******
. 
. xtprobit  intra_firm `list2', re

Fitting comparison model:

Iteration 0:   log likelihood = -40578.797
Iteration 1:   log likelihood = -36803.606
Iteration 2:   log likelihood = -36729.384
Iteration 3:   log likelihood =   -36729.3

Fitting full model:

rho =  0.0     log likelihood =   -36729.3
rho =  0.1     log likelihood =  -26334.76
rho =  0.2     log likelihood = -23774.773
rho =  0.3     log likelihood = -22473.158
rho =  0.4     log likelihood = -21646.377
rho =  0.5     log likelihood = -21115.769
rho =  0.6     log likelihood =  -20825.51
rho =  0.7     log likelihood = -20742.956
rho =  0.8     log likelihood = -21029.659

Iteration 0:   log likelihood = -20407.398  
Iteration 1:   log likelihood = -20172.662  
Iteration 2:   log likelihood =  -18763.72  
Iteration 3:   log likelihood = -18750.851  
Iteration 4:   log likelihood = -18750.851  
Iteration 5:   log likelihood = -18749.874  
Iteration 6:   log likelihood = -18749.871  
Iteration 7:   log likelihood = -18749.871  

Random-effects probit regression                Number of obs      =    101771
Group variable: siren_number                    Number of groups   =      6091

Random effects u_i ~ Gaussian                   Obs per group: min =         1
                                                               avg =      16.7
                                                               max =       296

                                                Wald chi2(15)      =   1389.03
Log likelihood  = -18749.871                    Prob > chi2        =    0.0000

------------------------------------------------------------------------------
  intra_firm |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       ln_kl |  -.1574718   .0289923    -5.43   0.000    -.2142957   -.1006479
       ln_hl |   .0665462    .093231     0.71   0.475    -.1161832    .2492757
 contr_orig1 |   -.228972   .0283603    -8.07   0.000    -.2845571   -.1733869
 contr_prod1 |  -.2730284   .0906652    -3.01   0.003     -.450729   -.0953278
          Qc |   .6891059   .1661392     4.15   0.000     .3634792    1.014733
ln_capital~4 |  -.0600482   .0186254    -3.22   0.001    -.0965534   -.0235431
ln_skill_i~4 |   .1061573   .0554682     1.91   0.056    -.0025583     .214873
  corp_tax_r |  -1.035081   .3297223    -3.14   0.002    -1.681325   -.3888371
financ_dev~p |  -.2370342   .0364289    -6.51   0.000    -.3084336   -.1656348
   oecd_1999 |   .1734364   .0443564     3.91   0.000     .0864994    .2603733
    ln_distw |   .0465058   .0178885     2.60   0.009     .0114449    .0815667
French_col~y |   .5911597   .0474232    12.47   0.000     .4982119    .6841074
French_spe~g |    .101627   .0436897     2.33   0.020     .0159969    .1872572
    legor_fr |   .1219713   .0331693     3.68   0.000     .0569607    .1869819
          IM |   3.743099   .1244772    30.07   0.000     3.499128     3.98707
       _cons |  -3.563113   .3569535    -9.98   0.000    -4.262729   -2.863497
-------------+----------------------------------------------------------------
    /lnsig2u |   2.086138   .0340343                      2.019433    2.152844
-------------+----------------------------------------------------------------
     sigma_u |   2.837914   .0482931                      2.744822    2.934163
         rho |   .8895486   .0033439                      .8828223    .8959343
------------------------------------------------------------------------------
Likelihood-ratio test of rho=0: chibar2(01) =  3.6e+04 Prob >= chibar2 = 0.000

. mfx

Marginal effects after xtprobit
      y  = Linear prediction (predict)
         = -3.6837109
------------------------------------------------------------------------------
variable |      dy/dx    Std. Err.     z    P>|z|  [    95% C.I.   ]      X
---------+--------------------------------------------------------------------
   ln_kl |  -.1574718      .02899   -5.43   0.000  -.214296 -.100648   11.0799
   ln_hl |   .0665462      .09323    0.71   0.475  -.116183  .249276   .908317
contr~g1 |   -.228972      .02836   -8.07   0.000  -.284557 -.173387    .31046
contr~d1 |  -.2730284      .09067   -3.01   0.003  -.450729 -.095328   .271969
      Qc |   .6891059      .16614    4.15   0.000   .363479  1.01473   .811513
ln_cap~4 |  -.0600482      .01863   -3.22   0.001  -.096553 -.023543    4.1123
ln_ski~4 |   .1061573      .05547    1.91   0.056  -.002558  .214873   3.17359
corp_t~r |  -1.035081      .32972   -3.14   0.002  -1.68132 -.388837   .335154
financ~p |  -.2370342      .03643   -6.51   0.000  -.308434 -.165635   .971717
oec~1999*|   .1734364      .04436    3.91   0.000   .086499  .260373   .825294
ln_distw |   .0465058      .01789    2.60   0.009   .011445  .081567   7.03894
French~y*|   .5911597      .04742   12.47   0.000   .498212  .684107   .079423
French~g*|    .101627      .04369    2.33   0.020   .015997  .187257   .167356
legor_fr*|   .1219713      .03317    3.68   0.000   .056961  .186982   .456761
      IM |   3.743099      .12448   30.07   0.000   3.49913  3.98707   .279707
------------------------------------------------------------------------------
(*) dy/dx is for discrete change of dummy variable from 0 to 1

. outreg2 `list2' using CP_extensive.xls, mfx ctitle(RE probit) `instruct' append
CP_extensive.tex
CP_extensive.xls
dir : seeout

. 
. *******
. 
. xtlogit  intra_firm  `list1', fe
note: multiple positive outcomes within groups encountered.
note: 12659 groups (198984 obs) dropped because of all positive or
      all negative outcomes.
note: IM omitted because of no within-group variance.

Iteration 0:   log likelihood =  -14032.09  
Iteration 1:   log likelihood = -13948.055  
Iteration 2:   log likelihood = -13948.012  
Iteration 3:   log likelihood = -13948.012  

Conditional fixed-effects logistic regression   Number of obs      =     35802
Group variable: siren_number                    Number of groups   =      1552

                                                Obs per group: min =         2
                                                               avg =      23.1
                                                               max =       296

                                                LR chi2(13)        =    577.40
Log likelihood  = -13948.012                    Prob > chi2        =    0.0000

------------------------------------------------------------------------------
  intra_firm |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       ln_kl |  -.2025019   .0481637    -4.20   0.000    -.2969011   -.1081028
       ln_hl |  -.0929701   .1546729    -0.60   0.548    -.3961234    .2101831
 contr_orig1 |  -.3298182   .0473009    -6.97   0.000    -.4225263   -.2371101
          Qc |   1.439439   .2738071     5.26   0.000     .9027866    1.976091
ln_capital~4 |  -.1639896   .0309635    -5.30   0.000    -.2246768   -.1033023
ln_skill_i~4 |   .2060329   .0907944     2.27   0.023     .0280791    .3839868
  corp_tax_r |  -1.441904   .5455946    -2.64   0.008     -2.51125   -.3725582
financ_dev~p |   -.421092   .0599468    -7.02   0.000    -.5385856   -.3035984
   oecd_1999 |   .2017795   .0737548     2.74   0.006     .0572228    .3463362
    ln_distw |  -.0134088   .0296511    -0.45   0.651     -.071524    .0447063
French_col~y |   1.223798   .0804268    15.22   0.000     1.066165    1.381432
French_spe~g |   .1153123   .0731626     1.58   0.115    -.0280837    .2587083
    legor_fr |   .1680017   .0541593     3.10   0.002     .0618515     .274152
------------------------------------------------------------------------------

. mfx, predict(pu0) force

Marginal effects after xtlogit
      y  =  (predict, pu0)
         =  .12836625
------------------------------------------------------------------------------
variable |      dy/dx    Std. Err.     z    P>|z|  [    95% C.I.   ]      X
---------+--------------------------------------------------------------------
   ln_kl |  -.0226576      .00797   -2.84   0.004  -.038278 -.007037   11.0861
   ln_hl |  -.0104023      .01905   -0.55   0.585  -.047736  .026932   .919939
contr~g1 |  -.0369028      .01777   -2.08   0.038  -.071739 -.002067   .306297
      Qc |   .1610564      .08491    1.90   0.058  -.005363  .327476   .818962
ln_cap~4 |  -.0183485      .00876   -2.09   0.036  -.035526 -.001171   4.17225
ln_ski~4 |   .0230527      .01711    1.35   0.178  -.010492  .056597    3.2031
corp_t~r |  -.1613323        .084   -1.92   0.055  -.325979  .003314   .332268
financ~p |  -.0471153      .02382   -1.98   0.048  -.093792 -.000439   .995388
oec~1999*|   .0214378      .01111    1.93   0.054  -.000344   .04322   .845707
ln_distw |  -.0015003      .00297   -0.50   0.614  -.007328  .004328   7.10002
French~y*|   .1943737      .06425    3.03   0.002   .068453  .320294   .080582
French~g*|   .0133047      .01052    1.27   0.206  -.007307  .033917   .141193
legor_fr*|   .0190099       .0099    1.92   0.055  -.000387  .038407   .412826
------------------------------------------------------------------------------
(*) dy/dx is for discrete change of dummy variable from 0 to 1

. outreg2 `list1' using CP_extensive.xls, mfx ctitle(FE logit) `instruct' append
CP_extensive.tex
CP_extensive.xls
dir : seeout

. 
. 
. *******
. 
. drop if  ln_lp_tfprod==.
(183251 observations deleted)

. egen ln_lp_tfprod_aver=mean(ln_lp_tfprod), by (nace_rev1_3dig)

. gen  ln_lp_tfprod2=ln_lp_tfprod- ln_lp_tfprod_aver

. drop ln_lp_tfprod_aver

. 
. 
. 
. probit intra_firm  ln_lp_tfprod2  ln_capital_intensity_firm ln_wage_based_skills_firm  `list2', cluster(siren_
> number)

Iteration 0:   log pseudolikelihood = -34364.214
Iteration 1:   log pseudolikelihood = -30692.664
Iteration 2:   log pseudolikelihood = -30579.539
Iteration 3:   log pseudolikelihood = -30579.073
Iteration 4:   log pseudolikelihood = -30579.073

Probit regression                                 Number of obs   =      82923
                                                  Wald chi2(18)   =     493.61
                                                  Prob > chi2     =     0.0000
Log pseudolikelihood = -30579.073                 Pseudo R2       =     0.1101

                        (Std. Err. adjusted for 4737 clusters in siren_number)
------------------------------------------------------------------------------
             |               Robust
  intra_firm |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
ln_lp_tfpr~2 |   .2213579   .0679701     3.26   0.001     .0881389    .3545769
ln_capital~m |   .1300525   .0358225     3.63   0.000     .0598416    .2002633
ln_wage_ba~m |    .499912   .1789082     2.79   0.005     .1492584    .8505656
       ln_kl |  -.0947761   .0275987    -3.43   0.001    -.1488685   -.0406836
       ln_hl |   .3111594   .0960306     3.24   0.001     .1229429    .4993759
 contr_orig1 |  -.2282713   .0336588    -6.78   0.000    -.2942413   -.1623013
 contr_prod1 |  -.3974746   .0737173    -5.39   0.000    -.5419578   -.2529914
          Qc |   .7422898   .1869179     3.97   0.000     .3759375    1.108642
ln_capital~4 |   .0111455   .0258944     0.43   0.667    -.0396066    .0618976
ln_skill_i~4 |   .3050008   .0887939     3.43   0.001      .130968    .4790335
  corp_tax_r |  -.6546641   .3044237    -2.15   0.032    -1.251324   -.0580046
financ_dev~p |  -.1216806   .0470273    -2.59   0.010    -.2138524   -.0295087
   oecd_1999 |   .0898632   .0517557     1.74   0.083     -.011576    .1913024
    ln_distw |   .1166333   .0249923     4.67   0.000     .0676493    .1656174
French_col~y |    .042064   .0694737     0.61   0.545    -.0941019    .1782299
French_spe~g |   .0433041    .050086     0.86   0.387    -.0548626    .1414708
    legor_fr |   .1206173   .0277951     4.34   0.000     .0661399    .1750948
          IM |   .8959225   .0695424    12.88   0.000     .7596219    1.032223
       _cons |  -4.831892   .5946442    -8.13   0.000    -5.997373   -3.666411
------------------------------------------------------------------------------

. mfx,  varlist(`list2')

Marginal effects after probit
      y  = Pr(intra_firm) (predict)
         =  .11653252
------------------------------------------------------------------------------
variable |      dy/dx    Std. Err.     z    P>|z|  [    95% C.I.   ]      X
---------+--------------------------------------------------------------------
   ln_kl |    -.01857      .00547   -3.39   0.001  -.029301 -.007839   11.0822
   ln_hl |   .0609673      .01901    3.21   0.001   .023706  .098229    .90734
contr~g1 |  -.0447266      .00685   -6.53   0.000  -.058145 -.031308   .318803
contr~d1 |  -.0778796      .01472   -5.29   0.000  -.106721 -.049038   .282137
      Qc |   .1454413      .03793    3.83   0.000   .071109  .219773   .811836
ln_cap~4 |   .0021838      .00507    0.43   0.666  -.007744  .012111   4.13386
ln_ski~4 |   .0597606      .01776    3.37   0.001   .024958  .094563   3.17455
corp_t~r |  -.1282723      .05952   -2.16   0.031  -.244922 -.011622   .335296
financ~p |  -.0238416      .00937   -2.54   0.011  -.042205 -.005478   .966263
oec~1999*|   .0169973      .00943    1.80   0.072  -.001488  .035483   .826598
ln_distw |   .0228527      .00506    4.52   0.000   .012937  .032769   7.01823
French~y*|   .0084187      .01417    0.59   0.552  -.019351  .036189   .074201
French~g*|   .0086318      .01014    0.85   0.394  -.011233  .028496   .166009
legor_fr*|   .0237718       .0056    4.25   0.000   .012803  .034741   .461018
      IM |   .1755435      .01408   12.46   0.000    .14794  .203147   .309478
------------------------------------------------------------------------------
(*) dy/dx is for discrete change of dummy variable from 0 to 1

. outreg2 `list2' using CP_extensive.xls, mfx ctitle(probit with controls) `instruct' append
CP_extensive.tex
CP_extensive.xls
dir : seeout

. 
. 
. **********************Interactions******************
. set more off

. 
. local list2 = "ln_kl ln_hl   contr_orig1  contr_prod1  ln_capital_intensity_cpa_4 ln_skill_intensity_cpa_4  co
> rp_tax_r financ_develop oecd_1999 ln_distw  French_colony French_speaking legor_fr IM"

. 
. 
. egen q1=pctile(ln_lp_tfprod2 ), p(25) by(nace_rev1_3dig)

. egen q2=pctile(ln_lp_tfprod2 ), p(50) by(nace_rev1_3dig)

. egen q3=pctile(ln_lp_tfprod2 ), p(75) by(nace_rev1_3dig)

. egen q4=pctile(ln_lp_tfprod2 ), p(99.9) by(nace_rev1_3dig)

. 
. gen Qc_tfp_firm_q1=0

. gen Qc_tfp_firm_q2=0

. gen Qc_tfp_firm_q3=0

. gen Qc_tfp_firm_q4=0

. 
. replace Qc_tfp_firm_q1=Qc*q1 if ln_lp_tfprod2 <= q1
(25940 real changes made, 550 to missing)

. replace Qc_tfp_firm_q2=Qc*q2 if ln_lp_tfprod2 > q1 & ln_lp_tfprod2<=q2 
(24944 real changes made, 455 to missing)

. replace Qc_tfp_firm_q3=Qc*q3 if ln_lp_tfprod2 > q2 & ln_lp_tfprod2<=q3
(25601 real changes made, 550 to missing)

. replace Qc_tfp_firm_q4=Qc*q4 if ln_lp_tfprod2 > q3
(21683 real changes made, 408 to missing)

. 
. drop q1 q2 q3 q4

. 
. 
. 
. probit intra_firm  ln_lp_tfprod2  ln_capital_intensity_firm ln_wage_based_skills_firm  `list2' Qc_tfp_firm_*, 
> cluster(siren_number)

Iteration 0:   log pseudolikelihood = -34364.214
Iteration 1:   log pseudolikelihood = -30572.576
Iteration 2:   log pseudolikelihood = -30453.618
Iteration 3:   log pseudolikelihood = -30453.095
Iteration 4:   log pseudolikelihood = -30453.095

Probit regression                                 Number of obs   =      82923
                                                  Wald chi2(21)   =     503.06
                                                  Prob > chi2     =     0.0000
Log pseudolikelihood = -30453.095                 Pseudo R2       =     0.1138

                        (Std. Err. adjusted for 4737 clusters in siren_number)
------------------------------------------------------------------------------
             |               Robust
  intra_firm |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
ln_lp_tfpr~2 |   .4531911   .1131569     4.00   0.000     .2314078    .6749745
ln_capital~m |   .1305336   .0353084     3.70   0.000     .0613304    .1997368
ln_wage_ba~m |   .4913998   .1752084     2.80   0.005     .1479978    .8348019
       ln_kl |  -.0741034   .0275482    -2.69   0.007    -.1280968     -.02011
       ln_hl |   .4238432   .0965437     4.39   0.000     .2346209    .6130654
 contr_orig1 |  -.2210877   .0336907    -6.56   0.000    -.2871202   -.1550552
 contr_prod1 |  -.4163831   .0707782    -5.88   0.000    -.5551058   -.2776604
ln_capital~4 |   .0098471   .0258739     0.38   0.704    -.0408648     .060559
ln_skill_i~4 |   .3070411   .0869374     3.53   0.000     .1366469    .4774353
  corp_tax_r |  -.8491431   .3086495    -2.75   0.006    -1.454085   -.2442012
financ_dev~p |  -.0486431   .0398712    -1.22   0.222    -.1267892     .029503
   oecd_1999 |   .1342362   .0489171     2.74   0.006     .0383604     .230112
    ln_distw |   .0821824   .0237931     3.45   0.001     .0355489     .128816
French_col~y |   .0439287   .0699826     0.63   0.530    -.0932347     .181092
French_spe~g |   .0498535   .0498216     1.00   0.317    -.0477952    .1475021
    legor_fr |   .0891034   .0279803     3.18   0.001      .034263    .1439438
          IM |   .9045314   .0700162    12.92   0.000     .7673022    1.041761
Qc_tfp_fir~1 |  -.8713471   .3113081    -2.80   0.005      -1.4815   -.2611944
Qc_tfp_fir~2 |  -1.036899   .4758906    -2.18   0.029    -1.969627   -.1041706
Qc_tfp_fir~3 |   .1752312   .2384513     0.73   0.462    -.2921248    .6425872
Qc_tfp_fir~4 |  -.1420638   .1271781    -1.12   0.264    -.3913283    .1072007
       _cons |  -4.369311    .581562    -7.51   0.000    -5.509151    -3.22947
------------------------------------------------------------------------------

. mfx,  varlist(Qc_tfp_firm_*)

Marginal effects after probit
      y  = Pr(intra_firm) (predict)
         =  .11576269
------------------------------------------------------------------------------
variable |      dy/dx    Std. Err.     z    P>|z|  [    95% C.I.   ]      X
---------+--------------------------------------------------------------------
Qc_tfp~1 |   -.169927      .06123   -2.78   0.006  -.289944  -.04991  -.062839
Qc_tfp~2 |  -.2022123       .0916   -2.21   0.027  -.381742 -.022683   .000225
Qc_tfp~3 |    .034173      .04658    0.73   0.463  -.057112  .125458   .068817
Qc_tfp~4 |  -.0277048      .02485   -1.11   0.265  -.076405  .020996   .177739
------------------------------------------------------------------------------

. test Qc_tfp_firm_q1= Qc_tfp_firm_q4

 ( 1)  Qc_tfp_firm_q1 - Qc_tfp_firm_q4 = 0

           chi2(  1) =    5.83
         Prob > chi2 =    0.0157

. outreg2 Qc_tfp_firm_* using Interactions.xls, mfx ctitle(Qc) `instruct' replace
Interactions.tex
Interactions.xls
dir : seeout

. 
. 
. 
. 
. drop Qc_* 

. 
. 
. log close
       log:  C:\Users\Public\Documents\Old\Lavoro Gregory\intra_firm_extensive_Table_6.log
  log type:  text
 closed on:   4 Sep 2013, 13:46:43
----------------------------------------------------------------------------------------------------------------
